home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SPACE 1
/
SPACE - Library 1 - Volume 1.iso
/
program
/
441
/
dlibs12
/
setbuf.c
< prev
next >
Wrap
C/C++ Source or Header
|
1990-11-23
|
352b
|
21 lines
#include <stdio.h>
void setbuf(fp, buf)
register FILE *fp;
unsigned char *buf;
{
fp->_flag &= ~(_IOFBF | _IOLBF | _IONBF | _IOMYBUF);
fp->_cnt = 0;
fp->_ptr = buf;
if(fp->_base = buf) /* assignment intentional */
{
fp->_flag |= _IOFBF;
fp->_bsiz = BUFSIZ;
}
else
{
fp->_flag |= _IONBF;
fp->_bsiz = 0;
}
}